package com.boot;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author Cheng JiYe
 * @description: 启动类
 * @date 2020/10/2 18:01
 */
@Slf4j
@EnableSwagger2
@SpringBootApplication
public class ManageSystemApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(ManageSystemApplication.class, args);
        log.info("启动成功");
    }

    /**
     * 支持war包部署到外置web服务器
     *
     * @param application
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ManageSystemApplication.class);
    }
}
